<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%
  String path = request.getContextPath();
  String merchantId = request.getParameter("merchantId");
  if (merchantId == null) {
      merchantId = "";
  }
%>
<!DOCTYPE html>
<html lang="en">
<head>
  <jsp:include page="/control/home/home_header.jsp"/>
  <link rel="stylesheet" href="<%=path%>/plugin/bootstrap/assets/css/jquery-ui-1.10.3.custom.min.css"/>
  <link rel="stylesheet" href="<%=path%>/plugin/bootstrap/assets/css/jquery.gritter.css"/>
  <link rel="stylesheet" href="<%=path%>/plugin/bootstrap/assets/css/select2.css"/>
  <link rel="stylesheet" href="<%=path%>/plugin/bootstrap/assets/css/bootstrap-editable.css"/>

  <link href="<%=path%>/plugin/bootstrap/assets/css/bootstrap.min.css" rel="stylesheet"/>
  <link rel="stylesheet" href="<%=path%>/plugin/bootstrap/assets/css/chosen.css"/>
  <link rel="stylesheet" href="<%=path%>/plugin/bootstrap/assets/css/ace.min.css"/>
  <script src="<%=path%>/plugin/bootstrap/assets/js/chosen.jquery.min.js"></script>
</head>
<body>
<jsp:include page="/control/home/home_navbar.jsp"/>

<div class="main-container" id="main-container">
  <script type="text/javascript">
    try {
      ace.settings.check('main-container', 'fixed')
    } catch (e) {
    }
  </script>

  <div class="main-container-inner">
    <a class="menu-toggler" id="menu-toggler" href="#"><span class="menu-text"></span></a>

    <jsp:include page="/control/home/home_navigation.jsp"/>

    <div class="row">
      <div class="col-xs-12">
        <!-- PAGE CONTENT BEGINS -->
        <div>
          <div id="user-profile-3" class="user-profile row">
            <div class="col-sm-offset-1 col-sm-10">

              <div class="space"></div>
              <form class="form-horizontal" id="saveReportForm" action="#" method="post" enctype="multipart/form-data">
                <div class="tabbable">

                  <div class="tab-content profile-edit-tab-content">
                    <div id="edit-basic" class="tab-pane in active">
                      <h4 class="header blue bolder smaller">商户信息</h4>
                      <input type="hidden" id="merchantId" name="merchantId" value="<%=merchantId%>"/>
                      <div class="row">
                        <div class="col-xs-12 col-sm-8">
                          <div id="mchntid-parent" class="form-group">
                            <label for="mchntid" class="col-xs-12 col-sm-3 control-label no-padding-right">*商户号</label>
                            <div class="col-xs-12 col-sm-4">
                                <span class="block input-icon input-icon-right">
                                    <input type="text" id="mchntid" name="mchntid" maxlength="15" class="cocho-check-null-and-warn col-input-normall col-sm-10"　onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" placeholder="商户号"/>
                                </span>
                            </div>
                          </div>

                          <div id="merchantName-parent" class="form-group">
                            <label for="merchantName" class="col-xs-12 col-sm-3 control-label no-padding-right">*商户名称</label>
                            <div class="col-xs-12 col-sm-4">
                                <span class="block input-icon input-icon-right">
                                    <input type="text" id="merchantName" name="merchantName" maxlength="64" class="cocho-check-null-and-warn col-input-normall col-sm-10" placeholder="商户名称"/>
                                </span>
                            </div>
                          </div>

                          <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right">*机构号</label>
                            <div class="col-sm-9">
                              <select class=" width-60" id="inscd" name="inscd"></select>
                            </div>
                          </div>

                          <div id="backUrl-parent" class="form-group">
                            <label for="backUrl" class="col-xs-12 col-sm-3 control-label no-padding-right">*异步通知地址</label>
                            <div class="col-xs-12 col-sm-4">
                                <span class="block input-icon input-icon-right">
                                    <input type="text" id="backUrl" name="backUrl" maxlength="512" class="cocho-check-null-and-warn col-input-normall col-sm-10" placeholder="异步通知地址"/>
                                </span>
                            </div>
                          </div>

                          <div id="txndir-parent" class="form-group">
                            <label for="txndir" class="col-xs-12 col-sm-3 control-label no-padding-right">*交易方向</label>
                            <div class="col-xs-12 col-sm-4">
                                <span class="block input-icon input-icon-right">
                                    <input type="text" id="txndir" name="txndir" maxlength="4" value="Q" class="cocho-check-null-and-warn col-input-normall col-sm-10" placeholder="交易方向"/>
                                </span>
                            </div>
                          </div>

                          <div id="version-parent" class="form-group">
                            <label for="version" class="col-xs-12 col-sm-3 control-label no-padding-right">*版本号</label>
                            <div class="col-xs-12 col-sm-4">
                                <span class="block input-icon input-icon-right">
                                    <input type="text" id="version" name="version" maxlength="4" value="2.1" class="cocho-check-null-and-warn col-input-normall col-sm-10" placeholder="版本号"/>
                                </span>
                            </div>
                          </div>

                          <div id="signType-parent" class="form-group">
                            <label for="signType" class="col-xs-12 col-sm-3 control-label no-padding-right">*签名方式</label>
                            <div class="col-xs-12 col-sm-4">
                                <span class="block input-icon input-icon-right">
                                    <input type="text" id="signType" name="signType" maxlength="10" value="SHA256" class="cocho-check-null-and-warn col-input-normall col-sm-10" placeholder="签名方式"/>
                                </span>
                            </div>
                          </div>

                          <div id="charset-parent" class="form-group">
                            <label for="charset" class="col-xs-12 col-sm-3 control-label no-padding-right">*编码格式</label>
                            <div class="col-xs-12 col-sm-4">
                                <span class="block input-icon input-icon-right">
                                    <input type="text" id="charset" name="charset" maxlength="64" value="utf-8" class="cocho-check-null-and-warn col-input-normall col-sm-10" placeholder="编码格式"/>
                                </span>
                            </div>
                          </div>

                          <div id="signKey-parent" class="form-group">
                            <label for="signKey" class="col-xs-12 col-sm-3 control-label no-padding-right">*密钥</label>
                            <div class="col-xs-12 col-sm-4">
                                <span class="block input-icon input-icon-right">
                                    <input type="text" id="signKey" name="signKey" maxlength="32" class="cocho-check-null-and-warn col-input-normall col-sm-10" placeholder="密钥"/>
                                </span>
                            </div>
                          </div>

                          <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right">*是否需要代付</label>
                            <div class="col-sm-9">
                              <select class=" width-60" id="isPay" name="isPay">
                                <option value="1">是</option>
                                <option value="2" selected="selected">否</option>
                              </select>
                            </div>
                          </div>

                          <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right">代付商户标识</label>
                            <div class="col-sm-9">
                              <select class=" width-60" id="usagetags" name="usagetags">
                                <option value="01">代付本商户</option>
                                <option value="02" selected="selected">代付其他商户</option>
                              </select>
                            </div>
                          </div>

                          <div id="acctNo-parent" class="form-group">
                            <label for="acctNo" class="col-xs-12 col-sm-3 control-label no-padding-right">收款人帐号</label>
                            <div class="col-xs-12 col-sm-4">
                                <span class="block input-icon input-icon-right">
                                    <input type="text" id="acctNo" name="acctNo" maxlength="32" class="col-input-normall col-sm-10" placeholder="收款人帐号"/>
                                </span>
                            </div>
                          </div>

                          <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right">收款人帐号类型</label>
                            <div class="col-sm-9">
                              <select class=" width-60" id="acctType" name="acctType">
                                <option value="0">对公帐号</option>
                                <option value="1" selected="selected">卡</option>
                                <option value="2">活期一本同</option>
                                <option value="3">定期一本同</option>
                                <option value="4">定期存折</option>
                                <option value="5">存单</option>
                                <option value="6">国债编号</option>
                                <option value="U">信用卡</option>
                              </select>
                            </div>
                          </div>

                          <div id="chName-parent" class="form-group">
                            <label for="chName" class="col-xs-12 col-sm-3 control-label no-padding-right">收款人姓名</label>
                            <div class="col-xs-12 col-sm-4">
                                <span class="block input-icon input-icon-right">
                                    <input type="text" id="chName" name="chName" maxlength="32" class="col-input-normall col-sm-10" placeholder="收款人姓名"/>
                                </span>
                            </div>
                          </div>

                          <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right">收款人证件类型</label>
                            <div class="col-sm-9">
                              <select class=" width-60" id="custmrtp" name="custmrtp">
                                <option value="0" selected="selected">身份证</option>
                              </select>
                            </div>
                          </div>

                          <div id="custmracnt-parent" class="form-group">
                            <label for="custmracnt" class="col-xs-12 col-sm-3 control-label no-padding-right">收款人证件号码</label>
                            <div class="col-xs-12 col-sm-4">
                                <span class="block input-icon input-icon-right">
                                    <input type="text" id="custmracnt" name="custmracnt" maxlength="32" class="col-input-normall col-sm-10" placeholder="收款人证件号码"/>
                                </span>
                            </div>
                          </div>

                          <div id="phoneNum-parent" class="form-group">
                            <label for="phoneNum" class="col-xs-12 col-sm-3 control-label no-padding-right">银行预留手机号码</label>
                            <div class="col-xs-12 col-sm-4">
                                <span class="block input-icon input-icon-right">
                                    <input type="text" id="phoneNum" name="phoneNum" maxlength="11" class="col-input-normall col-sm-10" placeholder="开户银行预留手机号码"/>
                                </span>
                            </div>
                          </div>

                          <div id="chBank-parent" class="form-group">
                            <label for="chBank" class="col-xs-12 col-sm-3 control-label no-padding-right">收款人银行中文名称</label>
                            <div class="col-xs-12 col-sm-4">
                                <span class="block input-icon input-icon-right">
                                    <input type="text" id="chBank" name="chBank" maxlength="64" class="col-input-normall col-sm-10" placeholder="收款人银行中文名称"/>
                                </span>
                            </div>
                          </div>

                          <div id="bankNo-parent" class="form-group">
                            <label for="bankNo" class="col-xs-12 col-sm-3 control-label no-padding-right">收款人开户行行号</label>
                            <div class="col-xs-12 col-sm-4">
                                <span class="block input-icon input-icon-right">
                                    <input type="text" id="bankNo" name="bankNo" maxlength="32" class="col-input-normall col-sm-10" placeholder="收款人开户行行号"/>
                                </span>
                            </div>
                          </div>

                          <div id="mchntid2-parent" class="form-group">
                            <label for="mchntid2" class="col-xs-12 col-sm-3 control-label no-padding-right">被代付的商户号</label>
                            <div class="col-xs-12 col-sm-4">
                                <span class="block input-icon input-icon-right">
                                    <input type="text" id="mchntid2" name="mchntid2" maxlength="32" class="col-input-normall col-sm-10" placeholder="被代付的商户号"/>
                                </span>
                            </div>
                          </div>

                        </div>
                      </div>
                      <hr/>
                    </div>
                  </div>

                  <div class="clearfix form-actions">
                    <div class="col-md-offset-3 col-md-9">
                      <button class="btn btn-info" type="button" onclick="saveMerchantInfo()"><i class="icon-ok bigger-110"></i>保存 </button>
                      &nbsp; &nbsp;
                      <button class="btn" type="reset"><i class="icon-undo bigger-110"></i>重置</button>
                    </div>
                  </div>
              </form>
            </div>
            <!-- /span -->
          </div>
          <!-- /user-profile -->
        </div>

        <!-- PAGE CONTENT ENDS -->
      </div>
      <!-- /.col -->
    </div>
    <!-- /.row -->
  </div>
  <!-- /.page-content -->
</div>
<!-- /.main-content -->

<jsp:include page="/control/home/home_settings.jsp"/>

</div>
<!-- /.main-container-inner -->

<jsp:include page="/control/home/home_scroll_top.jsp"/>

</div>
<!-- /.main-container -->

<jsp:include page="/control/home/home_footer.jsp"/>

<!-- page specific plugin scripts -->

<script src="<%=path%>/plugin/bootstrap/assets/js/jquery.gritter.min.js"></script>
<script src="<%=path%>/plugin/bootstrap/assets/js/x-editable/bootstrap-editable.min.js"></script>
<script src="<%=path%>/plugin/bootstrap/assets/js/x-editable/ace-editable.min.js"></script>

<jsp:include page="/plugin-customer/kindeditor/kindeditor.jsp"/>

<script src="<%=path%>/resources/js/cocho-check-and-warn.js"></script>
<script src="<%=path%>/control/merchant/merchant_edit_info.js"></script>
</body>
</html>
